﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/Frontend.master" AutoEventWireup="true" CodeFile="Register.aspx.cs" Inherits="Register" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" runat="server" contentplaceholderid="CPMainContent">
  <div class="post">
    <h2 class="title">
      New Users Register Here</h2>
    <div class="entry">
      <p>
       By registering you will be able to post comments and download the source code for the projects.
      </p>
      <asp:Panel ID="PnlRegistrationOptions" runat="server">
      <p>
      To register please fill in the form below. If you are already a member please click <a href="~/Login.aspx" runat="server">here</a> to login.
      </p>
      </asp:Panel>
    </div>
    <asp:CreateUserWizard ID="CreateUserWizardRegister" runat="server" 
      SkinID="BarricadeCreateUserWizard" CreateUserButtonText="Register Now!" 
      oncreatinguser="CreateUserWizardRegister_CreatingUser" 
      ContinueButtonText="Update your Details" 
      ContinueDestinationPageUrl="~/Members/Profile.aspx" 
      DuplicateEmailErrorMessage="Email Address Already Exists" 
      DuplicateUserNameErrorMessage="Email Address Already Exists" 
      InvalidPasswordErrorMessage="Minimum Password Length is 8 Characters" 
      RequireEmail="False" UnknownErrorMessage="An Unexpected Error Occurred." 
      oncreateduser="CreateUserWizardRegister_CreatedUser">
      <CompleteSuccessTextStyle Font-Bold="False" Font-Italic="False" 
        Font-Underline="False" />
      <WizardSteps>
        <asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
          <ContentTemplate>
            <table>
              <tr>
                <td align="right">
                  Email Address:</td>
                <td>
                  <asp:TextBox ID="UserName" runat="server"></asp:TextBox>
                  <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" 
                    ControlToValidate="UserName" ErrorMessage="Please enter a valid email address" 
                    ToolTip="Please enter a valid email address" ValidationGroup="CreateUserWizardRegister" 
                    CssClass="ErrorMessage">*</asp:RequiredFieldValidator>
                  <asp:RegularExpressionValidator ID="RegExValidatorUserName" runat="server" 
                    ControlToValidate="UserName" ErrorMessage="Please enter a valid email address" 
                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                    ValidationGroup="CreateUserWizardRegister" CssClass="ErrorMessage" 
                    ToolTip="Please enter a valid email address">*</asp:RegularExpressionValidator>
                </td>
              </tr>
              <tr>
                <td align="right">
                  <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
                </td>
                <td>
                  <asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>
                  <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" 
                    ControlToValidate="Password" ErrorMessage="Please enter a password" 
                    ToolTip="Please enter a password" ValidationGroup="CreateUserWizardRegister" 
                    CssClass="ErrorMessage">*</asp:RequiredFieldValidator>
                </td>
              </tr>
              <tr>
                <td align="right">
                  <asp:Label ID="ConfirmPasswordLabel" runat="server" 
                    AssociatedControlID="ConfirmPassword">Confirm Password:</asp:Label>
                </td>
                <td>
                  <asp:TextBox ID="ConfirmPassword" runat="server" TextMode="Password"></asp:TextBox>
                  <asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" 
                    ControlToValidate="ConfirmPassword" 
                    ErrorMessage="Please confirm your password" 
                    ToolTip="Please confirm your password" 
                    ValidationGroup="CreateUserWizardRegister" CssClass="ErrorMessage">*</asp:RequiredFieldValidator>
                </td>
              </tr>
              <tr>
                <td align="right">
                  <asp:Label ID="LblYearOfBirth" runat="server" Text="Year of Birth"></asp:Label>
                </td>
                <td>
                  <asp:DropDownList ID="DDLYearOfBirth" runat="server">
                  </asp:DropDownList>
                </td>
              </tr>
              <tr>
                <td align="right">
                  <asp:Label ID="QuestionLabel" runat="server" AssociatedControlID="Question">Security Question:</asp:Label>
                </td>
                <td>
                  <asp:TextBox ID="Question" runat="server"></asp:TextBox>
                  <asp:RequiredFieldValidator ID="QuestionRequired" runat="server" 
                    ControlToValidate="Question" ErrorMessage="Please enter a security question" 
                    ToolTip="Please enter a security question" 
                    ValidationGroup="CreateUserWizardRegister" CssClass="ErrorMessage">*</asp:RequiredFieldValidator>
                </td>
              </tr>
              <tr>
                <td align="right">
                  <asp:Label ID="AnswerLabel" runat="server" AssociatedControlID="Answer">Security Answer:</asp:Label>
                </td>
                <td>
                  <asp:TextBox ID="Answer" runat="server"></asp:TextBox>
                  <asp:RequiredFieldValidator ID="AnswerRequired" runat="server" 
                    ControlToValidate="Answer" ErrorMessage="Please enter the answer to your security question" 
                    ToolTip="Please enter the answer to your security question" 
                    ValidationGroup="CreateUserWizardRegister" CssClass="ErrorMessage">*</asp:RequiredFieldValidator>
                </td>
              </tr>
              <tr>
                <td align="center" colspan="2" class="FinePrint">
                  By registering you agree to the sites <a href="~/TermsAndConditions.aspx" runat="server">terms and conditions</a>.</td>
              </tr>
              <tr>
                <td align="center" colspan="2">
                  <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                    ControlToValidate="Password" CssClass="ErrorMessage" Display="Dynamic" 
                    ErrorMessage="Minimum Password Length is 8 Characters." Font-Bold="True" 
                    ValidationExpression=".{8}.*" ValidationGroup="CreateUserWizardRegister"></asp:RegularExpressionValidator>
                </td>
              </tr>
              <tr>
                <td align="center" colspan="2">                
                  <asp:CompareValidator ID="PasswordCompare" runat="server" 
                    ControlToCompare="Password" ControlToValidate="ConfirmPassword" 
                    CssClass="ErrorMessage" Display="Dynamic" 
                    ErrorMessage="The Password and Confirmation Password must match." 
                    Font-Bold="True" ValidationGroup="CreateUserWizardRegister"></asp:CompareValidator>                  
                </td>
              </tr>
              <tr>
                <td align="center" colspan="2">
                  <asp:Label ID="ErrorMessage" runat="server" CssClass="ErrorMessage"></asp:Label>
                </td>
              </tr>
              <tr>
              <td align="center" colspan="2">
                <asp:ValidationSummary ID="ValidationSummaryRegistration" runat="server" 
                  CssClass="ErrorMessage" ShowMessageBox="True" 
                  ShowSummary="False" ValidationGroup="CreateUserWizardRegister" 
                  HeaderText="Validation Error" />
              </tr>
            </table>
          </ContentTemplate>
        </asp:CreateUserWizardStep>
        <asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server">
        </asp:CompleteWizardStep>
      </WizardSteps>
    </asp:CreateUserWizard>
  </div>
  <div style="clear: both;">
    &nbsp;</div>
</asp:Content>


